#!/bin/bash

if [ -z ${LOGPATH} ]; then
  LOGPATH=.
fi

echo "start http service"

SYSTEM_PROPS=" -DLOGPATH=${LOGPATH}"

exec java -cp .:conf/*:lib/* \
  -Xms128m -Xmx512m \
  -XX:+UseG1GC \
  -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=${LOGPATH} -XX:ErrorFile=$LOGPATH/hs_err_%p.log \
  ${SYSTEM_PROPS} \
  com.example.mpgen.MpGenApplication
